<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>藏味优品</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="format-detection" content="telephone=no">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="stylesheet" href="__CSS__/amazeui.min.css"/>
    <link rel="stylesheet" href="__CSS__/style.css"/>
    <link rel="stylesheet" href="__CSS__/dropload.css"/>
    <script src="__JS__/jquery.min.js"></script>
    <script src="__JS__/amazeui.min.js"></script>
    <script src="__JS__/dropload.min.js"></script>
</head>
<body>
    <style type="text/css">
        .top-box {
            padding:10px;
            width:100%;
            color: white;
            background-color:#FF9C03;
            position: relative;
        }

        .top-box a {
            color:white !important;
        }

        .top-title {
            margin-left:20px;
            font-size:16px;
        }
        .top-right {
            font-size:16px;
            position:absolute;
            top:50%;
            right:10px;
            margin-top:-12px;
        }

        .m-widget-list a {
            margin-left:20px;
        }
        .m-widget-list a:after{
            display: inline-block;
            font: normal normal normal 1.6rem/1 FontAwesome,sans-serif;
            font-size: inherit;
            text-rendering: auto;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            transform: translate(0,0);
            content: "\f054";
            position: absolute;
            right: 10px;
            color: #ccc;
            top: 50%;
            margin-top: -8px;
        }
        .content-box {
            padding:15px;
        }
        .content-box p {
            margin:0 !important;
        }
        .button-margin {
            margin-bottom: 20px;
        }

    </style>
    <div class="top-box am-vertical-align">
        <div class="top-title am-vertical-align-middle"><a href="{:U('Index/index')}"><span>藏味优品</span></a></div>
        <!--<div class="top-right am-vertical-align-middle"><i class="am-icon-star-o"></i><span>关注</span>|<span>个人中心</span></div>-->
    </div>

    <div class="paoduct-title-panel">
        <h2 class="product-h1">私人定制</h2>
        <volist name="made_wallet" id="vo">
        <p><span class="product-title-gray-text"><i class="am-icon-crosshairs"></i> 您参加的私人定制-{$vo.made_name}钱包剩余:{$vo.money}元</span></p>
        </volist>
        <hr data-am-widget="divider" style="" class="am-divider-default am-margin-bottom-sm"/>
    </div>




    <div class="content-box">
        {$post_content}
    </div>



        <volist name="Madeinfo" id="made">
            <div class="paoduct-title-panel">
                <h2 class="product-h1">参加{$made['made_name']}私人定制 <button  class='xiang-qing' value="{$made['id']}">
                    详情
                </button></h2>

            <button class="am-btn am-btn-warning am-radius sure-dz" data-href="{:U('Customization/sure',array('made_id'=>$made['id'],'status'=>1))}" style="margin-bottom: 2px">
                定制金额：{$made['money_1']}|定制折扣{$made['discount_1']*100}折
            </button>
            <button class="am-btn am-btn-success  am-radius sure-dz" data-href="{:U('Customization/sure',array('made_id'=>$made['id'],'status'=>2))}" style="margin-bottom: 2px">
                定制金额：{$made['money_2']}|定制折扣{$made['discount_2']*100}折
            </button>
            <button class="am-btn  am-btn-danger  am-radius am-btn-warning sure-dz" data-href="{:U('Customization/sure',array('made_id'=>$made['id'],'status'=>3))}">
                定制金额：{$made['money_3']}|定制折扣{$made['discount_3']*100}折
            </button>

                <hr data-am-widget="divider" style="" class="am-divider-default am-margin-bottom-sm"/>
            </div>
        </volist>


    <!--<center class="button-margin">-->
        <!--<volist name="Madeinfo" id="made">-->
            <!--参加{$made['made_name']}私人定制-->
            <!--<button class="am-btn am-btn-warning am-radius sure-dz" data-href="{:U('Customization/sure',array('made_id'=>$made['id'],'status'=>1))}">-->
                <!--定制金额：{$made['money_1']}-->
            <!--</button>-->
            <!--<button class="am-btn am-btn-success  am-radius sure-dz" data-href="{:U('Customization/sure',array('made_id'=>$made['id'],'status'=>2))}">-->
                <!--定制金额：{$made['money_2']}-->
            <!--</button>-->
            <!--<button class="am-btn  am-btn-danger  am-radius am-btn-warning sure-dz" data-href="{:U('Customization/sure',array('made_id'=>$made['id'],'status'=>3))}">-->
                <!--定制金额：{$made['money_3']}-->
            <!--</button>-->
            <!--<br><br>-->
        <!--</volist>-->
    <!--</center>-->

    <!--模态弹窗-->
    <div class="am-modal am-modal-confirm" tabindex="-1" id="my-confirm" style="display: none;">
        <div class="am-modal-dialog">
            <div class="am-modal-hd">系统提醒</div>
            <div class="am-modal-bd">
                您确认要进行私人定制并且缴纳并从储值中扣除预缴费用吗？
            </div>
            <div class="am-modal-footer">
                <span class="am-modal-btn" data-am-modal-cancel>取消</span>
                <span class="am-modal-btn" data-am-modal-confirm>确定</span>
            </div>
        </div>
    </div>



    <div class="am-modal am-modal-confirm" tabindex="-1" id="ti-0" style="display: none;margin-top:-50%">
        <div class="am-modal-dialog">
            <div class="am-modal-hd">定制详情</div>
            <div class="am-modal-bd">
                {$Madeinfo['0']['jieshao']}

            </div>
            <div class="am-modal-footer">
                <span class="am-modal-btn" data-am-modal-confirm>确定</span>
            </div>
        </div>
    </div>
    <div class="am-modal am-modal-confirm" tabindex="-1" id="ti-1" style="display: none;margin-top:-50%">
        <div class="am-modal-dialog">
            <div class="am-modal-hd">定制详情</div>
            <div class="am-modal-bd">

                {$Madeinfo['1']['jieshao']}

            </div>
            <div class="am-modal-footer">
                <span class="am-modal-btn" data-am-modal-confirm>确定</span>
            </div>
        </div>
    </div>
    <div class="am-modal am-modal-confirm" tabindex="-1" id="ti-2" style="display: none;margin-top:-50%">
        <div class="am-modal-dialog">
            <div class="am-modal-hd">定制详情</div>
            <div class="am-modal-bd">

                {$Madeinfo['2']['jieshao']}
            </div>
            <div class="am-modal-footer">
                <span class="am-modal-btn" data-am-modal-confirm>确定</span>
            </div>
        </div>
    </div>



    <div class="am-modal am-modal-alert" tabindex="-1" id="my-alert">
        <div class="am-modal-dialog">
            <div class="am-modal-hd">系统提醒</div>
            <div class="am-modal-bd" id="tip-content">
                Hello world！
            </div>
            <div class="am-modal-footer">
                <span class="am-modal-btn" onclick="window.location.reload();">确定</span>

            </div>
        </div>
    </div>
    <script>
        $(function() {
            $(".sure-dz").bind("click", function () {
                var url = $(this).attr('data-href');
                $('#my-confirm').modal({
                    relatedTarget: this,
                    onConfirm: function (options) {
                        $.get(url, function (msg) {
                            if (msg['status']) {
                                $('#my-alert').modal();
                                $('#tip-content').text('定制成功');
                            } else {
                                $('#my-alert').modal();
                                $('#tip-content').text('定制失败'+msg['info']);
                            }
                        });
                    },

                });

            });
        });

        $(function() {
            $(".xiang-qing").bind("click", function () {
                var id = $(this).val();

                if(id==8){
                    $('#ti-0').modal({
                        relatedTarget: this
                    });
                };

                if(id==10){
                    $('#ti-1').modal({
                        relatedTarget: this
                    });
                };

                if(id==11){
                    $('#ti-2').modal({
                        relatedTarget: this
                    });
                };
            });
        });



    </script>

</body>
</html>